new Vue({
    el: '#app',
    mixins: [Save],//组件配置文件，路径/utils/components.js
    data() {
        return {
            dataForm: {
                Detailed_Address: ''
            },
            childDataForm: [{}],//资质认证
            qualification_category: [],
            city: [],//地址
        }
    },
    mounted() {
        /**
         * 组件配置文件中自动执行方法
         * 1.this.init(); //初始化文件
         * 2.this.getData(); //仅修改时执行，根据BOM配置属性查询
         */
        this.getList();
    },
    methods: {
        getList() {//获取主数据
            httpRequest({
                url: '/generalBusiness/generalQueryByTableName',
                data: {
                    Data: 'qualification_category',
                    Condition: `Row_Status='0'`
                },
                type: 'GET'
            }).then(data => {
                this.qualification_category = data;
            }).catch(xhr => {
                this.$message.error("系统错误，请联系开发者!")
            })
            $.ajax({
                url: absolutepath() + 'admin/data/dtree.json',
                type: 'GET',
                success: (data) => {
                    this.city = data;
                },
            })
        },
        changeCity(val) {//更新省/市
            this.dataForm.ProvinceNumber = val ? (val.substring(0, 2) + '0000') : '';
            this.dataForm.CityNumber = val ? (val.substring(0, 4) + '00') : '';
            this.dataForm.Detailed_Address = '';
        },
        handleDate(val, item) { //处理空指针
            if (val == null) {
                item.Expired_Datetime = '';
            }
        }
    }
})